University of Florida

Department of Electrical and Computer Engineering

EEL 5666 - Summer 2005

Intelligent Machines Design Laboratory

Instructor: A. Arroyo, E. M. Schwartz

TAs: William Dubel, Steven Pickles

 

 

T.E.R.E.S.A.

(T.E.R.E.S.A. – Tyrannous Effeminate Rambling Esoteric Sybaritic Arthopod)

the Six-Legged Robopuppy

SENSOR REPORT

 

Blake C. Sutton

 

 

 

 

 

 

Table of Contents

Abstract………………………………………………………………………………………………3

Introduction…………………………………………………………………………………………..3

Bump switches....…………………………………………………………………………….……....3

Ultrasound Ranger....…………………………………………………………………………….…..4

Pyroelectric Sensor....……………………………………………………………………………......5

Experimental Layout and Results…………………………………………………………………....6

Conclusion……………………………………………………………………………………….....11

Abstract

Sensors for Teresa, the Six-Legged Robopuppy, a pet hexapod robot, consist of bump switches, an ultrasound ranger, and a pyroelectric sensor. The bump switches are interfaced but not installed, and will be used for edge-of-the-world detection on the bottom of the robot’s feet and detecting the pull of a leash attached to the robot’s back. The ultrasound ranger is used for obstacle avoidance and has been fully interfaced and tested (see the Ultrasound Ranger and Experimental Layout and Results sections). The pyroelectric sensor is used to detect people and animals to play with and has been put together and tested in several situations (see the Pyroelectric Sensor and Experimental Layout and Results sections).

Behavior of these sensors has proved relatively reliable after testing, although installation on the platform may cause some changes. However, these changes are likely to be positive, as the robot's constant rocking motion as she walks may prove beneficial.

 

Introduction

Teresa’s sensors provide her with the feedback from the outside world required to make decisions. With her contact switches, ultrasound ranger, and pyroelectric sensor, she is able to see obstacles in her path, find humans (as heat sources), and potentially know when she has firm footing, when she has been picked up, and which direction her leash is pulled when she is walked.

A summary of effectiveness, purpose, software interface, and a qualitative assessment of each sensor type’s operation is included in the following sections. In the Experimental Layout and Result section, readings for the ultrasound ranger and pyroelectric sensor are collected and analyzed.

 

Bump Switches

Switches of some type (or custom manufacture) are planned for use on the bottom of some of Teresa’s feet and for some type of leash sensor. The switches on her feet will be used for edge-of-the-world detection (for example, to avoid walking off the edge of a table). A custom PCB (including resistors and slots for 6 switches) has already been designed, made, soldered, tested, and interfaced with software. However, the switch hardware has not yet been installed since the platform is still being perfected, although the mechanics are close to complete.

In addition, switches of some kind in conjunction with a sliding rod are planned for use to enable Teresa to crudely respond to the pull of a leash. Some plans and designs for this sensor have been made, but nothing has yet been formally built. However, the same PCB and software written and designed for Teresa’s foot switches can be used with minor modifications once the physical design is in place.

Due to the simple, digital nature of the switch hardware and drivers, no data was collected or analyzed for them.

 

Ultrasound Ranger

 

Teresa’s ultrasound sensor gives her vision in the sense of proximity detection. By emitting an ultrasound pulse and measuring the time it takes to receive the return pulse, the distance to the reflecting object (in the direction of the pulse) can be determined. The ultrasound ranger chosen was the Devantech SRF04, purchased from Acroname.

The interfacing software for the SRF04 uses a timed interrupt to check the output pin and maintain a count of the time elapsed since the pulse was sent out. Once the output pin drops low, signifying that the echo has been received back by the sensor, the timed interrupt is disabled and the resulting count is analyzed. This approach is relatively simple, but avoids the issues associated with polling. A timed interrupt every 67 us was used for this implementation, setting the resolution of the resulting reading at 67 us.

Data and analysis of the correlation between the SRF04 reading and the proximity of various objects can be found in the Experimental Layout and Results section.

 

Pyroelectric Sensor

The purpose of Teresa’s pyroelectric sensor is to give her the capability of finding humans or animals to interact with. The pyroelectric sensor chosen for the project was the Eltec Pyroelectric Sensor package, purchased for $64 from Acroname. After assembling the sensor housing (paper cone, rings, and lens were included in the kit), interfacing was simply a matter of using one of the Atmega128’s Analog-to-Digital Converter channels. Figure 1, below, shows the housing made for the pyroelectric sensor and the orientation for detecting motion.

Figure 1: Pyroelectric Sensor Housing and Orientation

The sensor constantly produces an analog value on its output pin whenever the power is connected. As a result, collecting a number of samples and averaging them together provided a good way to even out the data. The number of samples used at the time of this report was 8—however, the number can be easily modified in software at any time. To test the sensor, the 8 readings were averaged together and displayed on an LCD screen every 50 ms in order to provide feedback to correlate with the motion and heat in the world around it.

From the sample code provided by Acroname, thresholds for right and left motion (relative to the sensor housing’s orientation) were established for the Atmega128’s 10-bit conversion. These thresholds, along with their equivalent voltages, are summarized in the Experimental Layout and Results section.

Qualitatively, the sensor appears to be relatively sensitive to human motion anywhere from 2 inches to 7 feet inside the housing cone’s radius. However, the sensor provides anomalous readings (very high) for other heat sources, such as the 40 watt bulb in a nearby lamp. I did not have the chance to observe the sensor’s behavior toward other heat sources, or hot sun. Also, the distance of detection is probably even greater than 7 feet. However, for the purposes of Teresa’s affinity for humans, 7 feet is probably a sufficient range of detection.

Detailed data and analysis can be found in the Experimental Layout and Results section.

 

Experimental Layout and Results

Ultrasound Ranger

To test and characterize the SRF04 unit, the unit was set in a fixed position and readings were taken at measured distances from the receiver. For each distance, a reading was taken at a few points in a radius around the receiver in order to get an idea of the field of vision the unit encompasses.

Table 1, next page, summarizes the data from the experiment. For each of 4 distances from 2 inches to 2 feet, 4 readings were recorded. These readings were then translated to the pulse time by multiplying the period of the timed interrupt (67 us) by the raw reading.

Table 1: Ultrasound Pulse Time and Distance Data

The 4 pulse times for each distance are averaged together and analyzed in a graph in Figure 2, below. The graph shows a clear linear relationship between distance pulse width. A linear regression equation for the line, along with the correlation, appears on the figure.

Figure 2: SRF04 Distance vs. Pulse Width

To characterize the field of vision of the SRF04, groups of readings were taken at set distances, with different angles from the sensor center. Table 3, below, summarizes the data.

Table 2: Ultrasound Field of Vision Data

From the data in Table 2, the readings for different distances when the object is straight in front of the sensor are similar to the readings up to about 45 degrees angled out from either side of the sensor. Past 45 degrees, the object at 6 inches distance is no longer detected. However, a single SRF04’s field of operation is sufficient to represent the field of vision of a living creature like a puppy, which has only a limited field of vision compared to many robots, or to insects.

 

 

Pyroelectric Sensor

To characterize the sensor, the cone was set in a position so it could not move itself, limiting spikes in the signal to movement and heat detection in its field of vision. The Acroname sample code thresholds were used (2.38 V for right movement and 2.62 for left movement) to distinguish movement from normal fluctuation. These values proved relatively reliable—motion is always be detected from the appropriate direction, although the sensor is at times too sensitive. Widening the threshold range slightly could improve or eliminate this behavior if necessary.

Table 2: Pyroelectric Sensor Data

In Table 2, above, readings for different categories of motion and heat objects are summarized along with an average for each. Each reading consists of 8 samples from the pyro sensor averaged together, and consists of a hexadecimal number between 0x000 and 0x400 (0 and 1024), since the Atmega128’s ATD is a 10-bit converter.

As the data shows, the human movement detected falls in the range between 2.11 and 2.86 V, with values near 2.5 V considered neutral (no heat and movement). While the sensor does not screen out the heat of a light bulb (or a candle, most likely), the characteristic reading for the light bulb is much higher than the normal reading found for human movement, so it should be possible to screen out the sensitivity to the light bulb (and possibly other non-human heat sources) in software.

Figure 3, below, is a graph of the average voltages in Table 1 versus the categories of motion and heat applied to the sensor. Please see Table 1 for category descriptions. Clearly category 1 (the light bulb) and category 2 (immediately after facing the light bulb) are anomalous and should be ignored when using the sensor to detect humans.

Figure 3: Graph of Voltage versus Motion / Heat Source Category

Conclusion

The software for all of the sensors planned for use in Teresa, the Six-Legged Robopuppy has been written and tested, although none of the sensors have yet been physically installed on the platform. Mounting sensors on the platform, along with other mechanical components, is the next priority.

Since the sensors will effectively rock back and forth on Teresa as she walks, it is likely that the sensor’s behavior will change somewhat, although not drastically. The rocking motion could improve the ultrasound ranger’s performance do to the increased swatch of area covered. In the same way, the physical rocking of the robot could potentially avoid hassle with the pyroelectric sensor, since the sensor will not have to be panned to detect unmoving heat presences, as long as the robot is facing in the direction of a human.

Once the sensors are installed on the platform, of course, a version of the sensor characterization tests will be repeated in as many environments as possible.